/**  
* @author renbangjie renbangjie@126.com  
* @date 2014-11-18 下午12:41:41
* @version V1.0  
* <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
*/
package com.yjd.comm.enums;

import com.yjd.comm.system.model.SysParamModel;
import com.yjd.comm.system.util.SysParamUtil;
import com.yjd.comm.util.FrameUtil;
import com.yjd.comm.vo.Constant.SysParamKeyEnum;

/**
 * 认证相关的枚举
 * @author renbangjie renbangjie@126.com
 * @date 2014-11-18 下午12:41:41
 */
public class AuthEnums {
	
	public enum CardType{
		
		identity_normal(1, "大陆身份证"),
		identity_hk_macao(2, "港、澳证件"),
		identity_taiwan(3, "其他");
		
		private int code;
		private String label;
		
		private CardType(int code, String label) {
			this.code = code;
			this.label = label;
		}
		
		public static CardType parse(int code){
			for (CardType status : CardType.values()) {
				if(code == status.getCode()){
					return status;
				}
			}
			return null;
		}
		

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		public String getLabel() {
			return label;
		}

		public void setLabel(String label) {
			this.label = label;
		}
	}
	
	/**
	 * 认证状态
	* @author renbangjie renbangjie@126.com
	* @date 2014-11-18 下午12:43:15
	 */
	public enum AuthStatus{
		
		insufficientfund(100, "资金不足"),
		matching(1, "匹配"),
		mismatching(2, "实名信息不匹配"),
		nullity(3, "校验无数据"),
		error(-999, "查询异常"),
		authend(-998, "已认证"),
		asserts(-997, "已达到最大认证次数"),
		certNoUserd(-996, "证件号被占用"),
		formaterror(-995, "证件号格式错误"),
		youngman(-994, "未成年人"),
		audit(10001, "审核中");
		
		
		private int code;
		private String label;
		
		private AuthStatus(int code, String label) {
			this.code = code;
			this.label = label;
		}
		
		
		public static AuthStatus parse(int code){
			for (AuthStatus status : AuthStatus.values()) {
				if(code == status.getCode()){
					return status;
				}
			}
			return null;
		}
		

		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}

		public String getLabel() {
			return label;
		}

		public void setLabel(String label) {
			this.label = label;
		}
		
	}
	
	
	/**
	 * 认证费用
	* @author renbangjie renbangjie@126.com
	* @date 2014-11-18 下午1:16:33
	 */
	public enum AuthCharge{
		
		yes(1, "收费"),
		no(0, "不收费");
		
		private int code;
		private String label;
		
		private AuthCharge(int code, String label) {
			this.code = code;
			this.label = label;
		}
		
		
		public static AuthCharge parse(int code){
			for (AuthCharge charge : AuthCharge.values()) {
				if(code == charge.getCode()){
					return charge;
				}
			}
			return null;
		}
		
		
		public int getCode() {
			return code;
		}
		public void setCode(int code) {
			this.code = code;
		}
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
	}
	
	/**
	 * 认证审核状态
	* @author renbangjie renbangjie@126.com
	* @date 2015-3-13 上午11:54:56
	 */
	public enum AuthAuditStatus{
		audit(1, "审核中"),
		approval(2, "审核通过"),
		reject(3, "审核不通过");
		
		private int code;
		private String label;
		
		private AuthAuditStatus(int code, String label) {
			this.code = code;
			this.label = label;
		}
		
		
		public static AuthAuditStatus parse(int code){
			for (AuthAuditStatus charge : AuthAuditStatus.values()) {
				if(code == charge.getCode()){
					return charge;
				}
			}
			return null;
		}
		
		
		public int getCode() {
			return code;
		}
		public void setCode(int code) {
			this.code = code;
		}
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
	}
	
}
